﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using MotionFramework.MVC;

public class NewMoblieInterfaceModel : Proxy {

    // /// <summary>
    // /// 游戏列表数据
    // /// </summary>
	// public GameListModel GameListModel;

    // public MobileLoginDataModel MobileLoginDataModel;

    // public MobileLoginLaterModel MobileLoginLaterModel;

    // /// <summary>
    // /// 反序列化Json
    // /// </summary>
    // public T DeSerialize<T>(string text) where T : class
    // {
    //     try
    //     {
    //         BaseMoblieModel model = JsonUtility.FromJson<T>(text) as BaseMoblieModel;
    //         Debug.Log(text);
    //         if (model.code != 0)
    //         {
    //             Debug.LogError(model.msg);
    //             MessageBoxArg.ShowMsg("消息提示", model.msg);
    //             return null;
    //         }
    //         return model as T;
    //     }
    //     catch (Exception e)
    //     {
    //         Debug.LogException(e);
    //         return null;
    //     }
    // }

    // public void GetGameList(string text)
    // {
    //     GameListModel = DeSerialize<GameListModel>(text);
    //     if (GameListModel == null)
    //     {
    //         MessageBoxArg.ShowMsgWithCallBack("消息", "获取游戏列表失败", (go) =>
    //         {
    //             SendEvent(typeof(NewMoblieInterfaceCommand), ConstHttpCommands.GetGameListCommand);
    //         });
    //         return;
    //     }

    //     //ConstHttpCommands.GetMobileLoginDataCommand
    //     SendEvent(typeof(NewMoblieInterfaceCommand), ConstHttpCommands.GetMobileLoginDataCommand);

    //     GameSceneManager.Instance.LoadScene(AppSceneIndex.Download);
    // }

    // public void GetMobileLoginData(string text)
    // {
    //     MobileLoginDataModel = DeSerialize<MobileLoginDataModel>(text);
    // }

    // public void GetMobileLoginLater(string text)
    // {
    //     MobileLoginLaterModel = DeSerialize<MobileLoginLaterModel>(text);
    // }
}
